
import operate from '@dfeidao/atom-nodejs/db/operate';
// import { systemid } from './config';

interface Message {
	role_no: string;
	productid: string;
}
export default async function atom(msg: Message, action_id: string, session_id: string, spaceid: string) {
	const systemid = '12';

	const { del, exec } = operate(action_id, session_id, systemid);
	del('pub_role', { role_no: msg.role_no, productid: msg.productid });
	const ret = await exec();
	if (ret.code === 1) {
		return 'success';
	} else {
		return 'fail';
	}
}
